//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop

#include "diff.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TRead_par *Read_par;
extern int flagParam;
extern double E_fa, stepParam;
//---------------------------------------------------------------------------
__fastcall TRead_par::TRead_par(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TRead_par::FormCreate(TObject *Sender)
{
 char s[100];
 sprintf(s,"%f",stepParam);
 Edit1->Text = s;
 sprintf(s,"%f",E_fa);
 Edit2->Text = s;
 Param->ItemIndex = flagParam-1;
}
//---------------------------------------------------------------------------
void __fastcall TRead_par::Button2Click(TObject *Sender)
{
 Close();
}
//---------------------------------------------------------------------------
void __fastcall TRead_par::Button1Click(TObject *Sender)
{
 flagParam = Param->ItemIndex+1;
 stepParam = atof(Edit1->Text.c_str());
 E_fa = fabs(atof(Edit2->Text.c_str()));
 Close();
}
//---------------------------------------------------------------------------
